package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * 第四版生产计划
 * 计划排产对象 main_project_schedule
 * @author qijian
 * @date 2024-05-13
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_project_schedule")
public class ProjectSchedule extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "${column.columnComment}")
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @Excel(name = "项目id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "项目id")
    private Long projectId;

    @Excel(name = "间隔天数")
    @ApiModelProperty(value = "间隔天数")
    private Long step;

    @TableField(exist = false)
    private List<ProjectScheduleDetail> items;

}
